﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};

	var mgnstatusData = Jxstar.findComboData('mgnstatus');

	var cols = [
	{col:{header:'*供应商名称', width:196, sortable:true, editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.TriggerField({
			maxLength:50,
			editable:true, allowBlank:false,
			triggerClass:'x-form-search-trigger', 
			onTriggerClick: function() {
				var selcfg = {pageType:'combogrid', nodeId:'provider_select', layoutPage:'', sourceField:';', targetField:';', whereSql:"manage_status = '20'", whereValue:'', whereType:'', isSame:'1', isShowData:'1', isMoreSelect:'0',isReadonly:'0',fieldName:'pur_provider.provider_name'};
				JxSelect.createSelectWin(selcfg, this, 'node_pur_say_provider_editgrid');
			}
		})}, field:{name:'pur_provider__provider_name',type:'string'}},
	{col:{header:'采购单ID', width:100, sortable:true, hidden:true}, field:{name:'pur_provider__apply_id',type:'string'}},
	{col:{header:'主键', width:100, sortable:true, hidden:true}, field:{name:'pur_provider__pur_provid',type:'string'}},
	{col:{header:'地址', width:231, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'pur_provider__address',type:'string'}},
	{col:{header:'联系人', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'pur_provider__business_rep',type:'string'}},
	{col:{header:'联系电话', width:132, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'pur_provider__rep_phone',type:'string'}},
	{col:{header:'供应商编号', width:100, sortable:true, hidden:true}, field:{name:'pur_provider__provider_code',type:'string'}},
	{col:{header:'是否合格', width:69, sortable:true, align:'center',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: mgnstatusData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: mgnstatusData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < mgnstatusData.length; i++) {
				if (mgnstatusData[i][0] == value)
					return mgnstatusData[i][1];
			}
		}}, field:{name:'pur_provider__manage_status',type:'string'}},
	{col:{header:'是否选中', width:70, sortable:true, defaultval:'0', editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.Checkbox(),
		renderer:function(value) {
			return value=='1' ? jx.base.yes : jx.base.no;
		}}, field:{name:'pur_provider__isbid',type:'string'}},
	{col:{header:'供应商ID', width:100, sortable:true, hidden:true}, field:{name:'pur_provider__provider_id',type:'string'}}
	];
	
	config.param = {
		cols: cols,
		sorts: null,
		hasQuery: '0',
		isedit: '1',
		isshow: '0',
		funid: 'pur_say_provider'
	};
	
	
		
	return new Jxstar.GridNode(config);
}